package com.ppblock.shirox.core.impl;

import com.ppblock.shirox.core.AuthenticationToken;

/**
 * 简易登录实现，使用传统的用户名密码登录，而非 token.
 * @author yangjian
 * @since 17-12-5.
 */
public class UsernamePasswordToken implements AuthenticationToken {

	/**
	 * 用户名
	 */
	private String username;

	/**
	 * 密码
	 */
	private String password;

	/**
	 * 是否记住密码
	 */
	private boolean isRemeberMe = false;

	public UsernamePasswordToken() {}

	public UsernamePasswordToken(String username, String password) {
		this.username = username;
		this.password = password;
	}

	public UsernamePasswordToken(String username, String password, boolean isRemeberMe) {
		this.username = username;
		this.password = password;
		this.isRemeberMe = isRemeberMe;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isRemeberMe() {
		return isRemeberMe;
	}

	public void setRemeberMe(boolean remeberMe) {
		isRemeberMe = remeberMe;
	}

	@Override
	public boolean isRememberMe() {
		return this.isRemeberMe;
	}
}
